home *** CD-ROM | disk | FTP | other *** search
- -- background: 2736 from stack: in
- -- bmap block id: 3197
- -- flags: 0000
- -- background id: 0
- -- name:
- ----- HyperTalk script -----
- ----------------------- Hyper Library Routine -----------------------
-
- on openCard
- global bookNumber,fieldList, autoNumbering,tentativeBook
- put the short date into field "today's Date"
- if (script of this card is not empty) and (autoNumbering is true) then
- if field "Book Number" is empty then
- put bookNumber into field "Book Number"
- put true into tentativeBook
- end if
- end if
- end openCard
-
- on closeCard
- global bookNumber,fieldList,tentativeBook
-
- if fieldList is not empty then
- set cursor to 4
- if tentativeBook is true then
- put quote&"Book Number""e&"," after fieldList
- add 1 to bookNumber
- put false into tentativeBook
- end if
-
- put char 1 to (length(fieldList) - 1) of fieldList into fieldList
- put fieldList into tempFieldList
- put 0 into index
-
- put name of target into targName
- repeat until tempFieldList is empty
- add 1 to index
- put item 1 of tempFieldList into fldTemp
- put "put field "&fldTemp&" of "&targName& " into var"&index into cmdLine
- do cmdLine
- put empty into item 1 of tempFieldList
- put empty into char 1 of tempFieldList -- rid leading comma.
- end repeat
-
- set lockScreen to true
- set lockMessages to true
- push card
-
- ----------------------- Circulation Card --------------------------
- do line 5 of script of this card
-
- put empty into targetFieldList
- repeat with indx = 1 to the number of fields
- put (word 3 of name of field indx) & "," after targetFieldList
- end repeat
-
- repeat with indx = 1 to index
- put item indx of fieldList into tempItem
- if tempItem is in targetFieldList then
- put "put var"&indx&" into field "&tempItem into cmdLine
- do cmdLine
- end if
- end repeat
-
- ---------------------- Catalog Screen -------------------------
- do line 8 of script of this card
-
- put empty into targetFieldList
- repeat with indx = 1 to the number of fields
- put (word 3 of name of field indx) & "," after targetFieldList
- end repeat
-
- repeat with indx = 1 to index
- put item indx of fieldList into tempItem
- if tempItem is in targetFieldList then
- put "put var"&indx&" into field "&tempItem into cmdLine
- do cmdLine
- end if
- end repeat
- --------------------- Acquisition Screen ----------------------
- do line 2 of script of this card
-
- put empty into targetFieldList
- repeat with indx = 1 to the number of fields
- put (word 3 of name of field indx) & "," after targetFieldList
- end repeat
-
- repeat with indx = 1 to index
- put item indx of fieldList into tempItem
- if tempItem is in targetFieldList then
- put "put var"&indx&" into field "&tempItem into cmdLine
- do cmdLine
- end if
- end repeat
- ------------------------------------------------------------------
- pop card
- set lockMessages to false
- set lockScreen to false
-
- end if
-
- if tentativeBook is true then
- put empty into field "Book Number"
- put false into tentativeBook
- end if
-
- put empty into fieldList
- end closeCard
-
- on innerReplication
- put field "title" into field "title2"
- put field "author" into field "author2"
- put field "Book Number" into field "Book Number2"
- put field "Book Number" into field "Book Number3"
- put field "Call Number" into field "Call Number2"
- put field "Call Number" into field "Call Number3"
- end innerReplication
-
- on newField
- global fieldScript
- put name of target into targName
- if word 1 of targName is "bkgnd" then
- ask "Name of field?"
- put it into tmpFldName
- if tmpFldName is empty then
- answer "Unnamed; field will not copy to other stacks"
- else
- set name of targName to tmpFldName
- set script of targName to fieldScript
- end if
- end if
- end newField
-
- on doMenu parm
- if name of this card is name of target then
- if parm is "New Card" then
- mkNewCard
- else
- if parm is "Delete Card" then
- delCard
- else
- if parm is "New Field" then
- set editBkgnd to true
- pass doMenu
- else
- if parm is "Open Stack..." then
- set cursor to 4
- quit
- pass doMenu
- else
- if parm is "Cut Card" then
- -- cut card conditional
- else
- if parm is "Paste Card" then
- --
- else
- pass doMenu
- end if
- end if
- end if
- end if
- end if
- end if
- else
- pass doMenu
- end if
- end doMenu
- --------------------- End Open Stack Routine ---------------------------
-
-
-
- -- part 1 (field)
- -- low flags: 00
- -- high flags: 4002
- -- rect: left=56 top=63 right=124 bottom=118
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 4
- -- text size: 9
- -- style flags: 0
- -- line height: 12
- -- part name: Call number
- ----- HyperTalk script -----
- on closeField
- global fieldList
- put word 3 of name of me into tempName
- if not(fieldList contains tempName) then
- put (word 3 of name of me) & "," after fieldList
- end if
- end closeField
-
-
- -- part 2 (field)
- -- low flags: 00
- -- high flags: 0002
- -- rect: left=55 top=133 right=145 bottom=117
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 4
- -- text size: 9
- -- style flags: 0
- -- line height: 12
- -- part name: Book Number
- ----- HyperTalk script -----
- on closeField
- global fieldList,bookNumber,tentativeBook
- if tentativeBook is true then
- put field "Book Number" into bookNumber
- else
-
- put word 3 of name of me into tempName
- if not(fieldList contains tempName) then
- put (word 3 of name of me) & "," after fieldList
- end if
- end if
- end closeField
-
-
- -- part 3 (field)
- -- low flags: 00
- -- high flags: 0002
- -- rect: left=180 top=63 right=75 bottom=376
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 4
- -- text size: 9
- -- style flags: 0
- -- line height: 12
- -- part name: Author
- ----- HyperTalk script -----
- on closeField
- global fieldList
- put word 3 of name of me into tempName
- if not(fieldList contains tempName) then
- put (word 3 of name of me) & "," after fieldList
- end if
- end closeField
-
-
- -- part 4 (field)
- -- low flags: 00
- -- high flags: 4002
- -- rect: left=180 top=74 right=123 bottom=376
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 4
- -- text size: 9
- -- style flags: 0
- -- line height: 12
- -- part name: Title
- ----- HyperTalk script -----
- on closeField
- global fieldList
- put word 3 of name of me into tempName
- if not(fieldList contains tempName) then
- put (word 3 of name of me) & "," after fieldList
- end if
- end closeField
-
-
- -- part 5 (field)
- -- low flags: 00
- -- high flags: 0002
- -- rect: left=180 top=122 right=135 bottom=376
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 4
- -- text size: 9
- -- style flags: 0
- -- line height: 12
- -- part name: Author2
- ----- HyperTalk script -----
- on closeField
- global fieldList
- put word 3 of name of me into tempName
- if not(fieldList contains tempName) then
- put (word 3 of name of me) & "," after fieldList
- end if
- end closeField
-
-
- -- part 6 (field)
- -- low flags: 00
- -- high flags: 0002
- -- rect: left=180 top=135 right=183 bottom=376
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 4
- -- text size: 9
- -- style flags: 0
- -- line height: 12
- -- part name: Title2
- ----- HyperTalk script -----
- on closeField
- global fieldList
- put word 3 of name of me into tempName
- if not(fieldList contains tempName) then
- put (word 3 of name of me) & "," after fieldList
- end if
- end closeField
-
-
- -- part 8 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=399 top=297 right=320 bottom=425
- -- title width / last selected line: 0
- -- icon id / first selected line: 9301 / 9301
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Prev
- ----- HyperTalk script -----
- on mouseUp
- go to prev card
- end mouseUp
-
-
-
- -- part 9 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=434 top=297 right=320 bottom=459
- -- title width / last selected line: 0
- -- icon id / first selected line: 27009 / 27009
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Next
- ----- HyperTalk script -----
- on mouseUp
- go to next card
- end mouseUp
-
-
-
- -- part 10 (field)
- -- low flags: 00
- -- high flags: 0002
- -- rect: left=117 top=63 right=111 bottom=182
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 4
- -- text size: 9
- -- style flags: 0
- -- line height: 12
- -- part name: Call Number2
- ----- HyperTalk script -----
- on closeField
- global fieldList
- put word 3 of name of me into tempName
- if not(fieldList contains tempName) then
- put (word 3 of name of me) & "," after fieldList
- end if
- end closeField
-
-
- -- part 11 (field)
- -- low flags: 00
- -- high flags: 0002
- -- rect: left=117 top=122 right=170 bottom=182
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 4
- -- text size: 9
- -- style flags: 0
- -- line height: 12
- -- part name: Call Number3
- ----- HyperTalk script -----
- on closeField
- global fieldList
- put word 3 of name of me into tempName
- if not(fieldList contains tempName) then
- put (word 3 of name of me) & "," after fieldList
- end if
- end closeField
-
-
- -- part 12 (field)
- -- low flags: 00
- -- high flags: 0002
- -- rect: left=117 top=110 right=122 bottom=182
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 4
- -- text size: 9
- -- style flags: 0
- -- line height: 12
- -- part name: Book Number2
- ----- HyperTalk script -----
- on closeField
- global fieldList
- put word 3 of name of me into tempName
- if not(fieldList contains tempName) then
- put (word 3 of name of me) & "," after fieldList
- end if
- end closeField
-
-
- -- part 13 (field)
- -- low flags: 00
- -- high flags: 0002
- -- rect: left=117 top=170 right=183 bottom=182
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 4
- -- text size: 9
- -- style flags: 0
- -- line height: 12
- -- part name: Book Number3
- ----- HyperTalk script -----
- on closeField
- global fieldList
- put word 3 of name of me into tempName
- if not(fieldList contains tempName) then
- put (word 3 of name of me) & "," after fieldList
- end if
- end closeField
-
-
- -- part 14 (field)
- -- low flags: 00
- -- high flags: 0002
- -- rect: left=56 top=192 right=324 bottom=376
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 4
- -- text size: 9
- -- style flags: 0
- -- line height: 12
- -- part name: NewField
- ----- HyperTalk script -----
- on closeField
- global fieldList
- put word 3 of name of me into tempName
- if not(fieldList contains tempName) then
- put (word 3 of name of me) & "," after fieldList
- end if
- end closeField
-
-
- -- part 18 (button)
- -- low flags: 00
- -- high flags: 8003
- -- rect: left=403 top=35 right=113 bottom=504
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Acquisitions
- ----- HyperTalk script -----
- on mouseUp
- goAcq
- end mouseUp
-
-
-
- -- part 19 (button)
- -- low flags: 00
- -- high flags: 8003
- -- rect: left=406 top=121 right=198 bottom=504
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Print
- ----- HyperTalk script -----
- on mouseUp
- set cursor to 4
- innerReplication
- -- set margins:
- put 10 into firstMargin
- put 20 into secondMargin
- put 52 into thirdMargin
-
- put empty into tempFld
- repeat with i = 1 to 10
- put " " into line i of tempFld
- end repeat
-
- -- temps to speed things up:
- put thirdMargin - secondMargin -1 into thirdWidth
- put firstMargin -1 into endOne
- put firstMargin +1 into startTwo
- put secondMargin +2 into startThree
-
- repeat with k = 1 to 5
- put char 1 to endOne of line k of field "call number" into char 1 to endOne of line k of tempFld
- end repeat
-
- put char 1 to endOne of field "Book Number" into char 1 to endOne of line 7 of tempFld
-
- put char 1 to endOne of field "Book Number2" into char startTwo to secondMargin of line 5 of tempFld
-
- put char 1 to endOne of field "Book Number3" into char startTwo to secondMargin of line 10 of tempFld
-
- repeat with k = 1 to 4
- put char 1 to endOne of line k of field "call number2" into char firstMargin+1 to secondMargin of line k of tempFld
- put char 1 to endOne of line k of field "call number3" into char startTwo to secondMargin of line k+5 of tempFld
- end repeat
-
- put char 1 to thirdWidth of field "Author" into char startThree to thirdMargin of line 1 of tempFld
-
- put char 1 to thirdWidth of field "Author2" into char startThree to thirdMargin of line 6 of tempFld
-
- repeat with k = 1 to 4
- put char 1 to thirdWidth of line k of field "Title" into char startThree to thirdMargin of line k+1 of tempFld
-
- put char 1 to thirdWidth of line k of field "Title2" into char startThree to thirdMargin of line k+6 of tempFld
- end repeat
-
- put tempFld into field "newField"
- end mouseUp
-
-
-
- -- part 23 (field)
- -- low flags: 01
- -- high flags: 0000
- -- rect: left=105 top=22 right=36 bottom=206
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Today's Date
-
-
- -- part 24 (button)
- -- low flags: 00
- -- high flags: 8003
- -- rect: left=405 top=238 right=260 bottom=505
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Control
- ----- HyperTalk script -----
- on mouseUp
- go to stack "Control"
- end mouseUp
-
-